<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE DeriveDataTypeable #-}</span><span>
</span><span id="line-2"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Types.VersionInterval</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-3"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Version intervals</span></span><span>
</span><span id="line-4"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier">VersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#toVersionIntervals"><span class="hs-identifier">toVersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#fromVersionIntervals"><span class="hs-identifier">fromVersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#withinIntervals"><span class="hs-identifier">withinIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#versionIntervals"><span class="hs-identifier">versionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#mkVersionIntervals"><span class="hs-identifier">mkVersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#unionVersionIntervals"><span class="hs-identifier">unionVersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#intersectVersionIntervals"><span class="hs-identifier">intersectVersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#invertVersionIntervals"><span class="hs-identifier">invertVersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#relaxLastInterval"><span class="hs-identifier">relaxLastInterval</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#relaxHeadInterval"><span class="hs-identifier">relaxHeadInterval</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>
</span><span id="line-16"></span><span>    </span><span class="annot"><span class="hs-comment">-- * Version intervals view</span></span><span>
</span><span id="line-17"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#asVersionIntervals"><span class="hs-identifier">asVersionIntervals</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier">VersionInterval</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier">LowerBound</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier">UpperBound</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-21"></span><span>    </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#Bound"><span class="hs-identifier">Bound</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-22"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Exception.html#"><span class="hs-identifier">Control.Exception</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#assert"><span class="hs-identifier">assert</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html"><span class="hs-identifier">Distribution.Types.Version</span></a></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html"><span class="hs-identifier">Distribution.Types.VersionRange.Internal</span></a></span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-comment">-- NonEmpty</span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#foldr1"><span class="hs-identifier">foldr1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-35"></span><span class="hs-comment">-- VersionRange</span><span>
</span><span id="line-36"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-comment">-- | View a 'VersionRange' as a union of intervals.</span><span>
</span><span id="line-39"></span><span class="hs-comment">--</span><span>
</span><span id="line-40"></span><span class="hs-comment">-- This provides a canonical view of the semantics of a 'VersionRange' as</span><span>
</span><span id="line-41"></span><span class="hs-comment">-- opposed to the syntax of the expression used to define it. For the syntactic</span><span>
</span><span id="line-42"></span><span class="hs-comment">-- view use 'foldVersionRange'.</span><span>
</span><span id="line-43"></span><span class="hs-comment">--</span><span>
</span><span id="line-44"></span><span class="hs-comment">-- Each interval is non-empty. The sequence is in increasing order and no</span><span>
</span><span id="line-45"></span><span class="hs-comment">-- intervals overlap or touch. Therefore only the first and last can be</span><span>
</span><span id="line-46"></span><span class="hs-comment">-- unbounded. The sequence can be empty if the range is empty</span><span>
</span><span id="line-47"></span><span class="hs-comment">-- (e.g. a range expression like @&lt; 1 &amp;&amp; &gt; 2@).</span><span>
</span><span id="line-48"></span><span class="hs-comment">--</span><span>
</span><span id="line-49"></span><span class="hs-comment">-- Other checks are trivial to implement using this view. For example:</span><span>
</span><span id="line-50"></span><span class="hs-comment">--</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- &gt; isNoVersion vr | [] &lt;- asVersionIntervals vr = True</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- &gt;                | otherwise                   = False</span><span>
</span><span id="line-53"></span><span class="hs-comment">--</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- &gt; isSpecificVersion vr</span><span>
</span><span id="line-55"></span><span class="hs-comment">-- &gt;    | [(LowerBound v  InclusiveBound</span><span>
</span><span id="line-56"></span><span class="hs-comment">-- &gt;       ,UpperBound v' InclusiveBound)] &lt;- asVersionIntervals vr</span><span>
</span><span id="line-57"></span><span class="hs-comment">-- &gt;    , v == v'   = Just v</span><span>
</span><span id="line-58"></span><span class="hs-comment">-- &gt;    | otherwise = Nothing</span><span>
</span><span id="line-59"></span><span class="hs-comment">--</span><span>
</span><span id="line-60"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#asVersionIntervals"><span class="hs-identifier hs-type">asVersionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-61"></span><span id="asVersionIntervals"><span class="annot"><span class="annottext">asVersionIntervals :: VersionRange -&gt; [VersionInterval]
</span><a href="Distribution.Types.VersionInterval.html#asVersionIntervals"><span class="hs-identifier hs-var hs-var">asVersionIntervals</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionIntervals -&gt; [VersionInterval]
</span><a href="Distribution.Types.VersionInterval.html#versionIntervals"><span class="hs-identifier hs-var">versionIntervals</span></a></span><span> </span><span class="annot"><span class="annottext">(VersionIntervals -&gt; [VersionInterval])
-&gt; (VersionRange -&gt; VersionIntervals)
-&gt; VersionRange
-&gt; [VersionInterval]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#toVersionIntervals"><span class="hs-identifier hs-var">toVersionIntervals</span></a></span><span>
</span><span id="line-62"></span><span>
</span><span id="line-63"></span><span>
</span><span id="line-64"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-65"></span><span class="hs-comment">-- VersionInterval</span><span>
</span><span id="line-66"></span><span class="hs-comment">-------------------------------------------------------------------------------</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-comment">-- | A complementary representation of a 'VersionRange'. Instead of a boolean</span><span>
</span><span id="line-69"></span><span class="hs-comment">-- version predicate it uses an increasing sequence of non-overlapping,</span><span>
</span><span id="line-70"></span><span class="hs-comment">-- non-empty intervals.</span><span>
</span><span id="line-71"></span><span class="hs-comment">--</span><span>
</span><span id="line-72"></span><span class="hs-comment">-- The key point is that this representation gives a canonical representation</span><span>
</span><span id="line-73"></span><span class="hs-comment">-- for the semantics of 'VersionRange's. This makes it easier to check things</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- like whether a version range is empty, covers all versions, or requires a</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- certain minimum or maximum version. It also makes it easy to check equality</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- or containment. It also makes it easier to identify \'simple\' version</span><span>
</span><span id="line-77"></span><span class="hs-comment">-- predicates for translation into foreign packaging systems that do not</span><span>
</span><span id="line-78"></span><span class="hs-comment">-- support complex version range expressions.</span><span>
</span><span id="line-79"></span><span class="hs-comment">--</span><span>
</span><span id="line-80"></span><span class="hs-keyword">newtype</span><span> </span><span id="VersionIntervals"><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="VersionIntervals"><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-81"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679632179"><span id="local-6989586621679632185"><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals -&gt; Bool
(VersionIntervals -&gt; VersionIntervals -&gt; Bool)
-&gt; (VersionIntervals -&gt; VersionIntervals -&gt; Bool)
-&gt; Eq VersionIntervals
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: VersionIntervals -&gt; VersionIntervals -&gt; Bool
$c/= :: VersionIntervals -&gt; VersionIntervals -&gt; Bool
== :: VersionIntervals -&gt; VersionIntervals -&gt; Bool
$c== :: VersionIntervals -&gt; VersionIntervals -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679632160"><span id="local-6989586621679632162"><span id="local-6989586621679632169"><span class="annot"><span class="annottext">Int -&gt; VersionIntervals -&gt; ShowS
[VersionIntervals] -&gt; ShowS
VersionIntervals -&gt; String
(Int -&gt; VersionIntervals -&gt; ShowS)
-&gt; (VersionIntervals -&gt; String)
-&gt; ([VersionIntervals] -&gt; ShowS)
-&gt; Show VersionIntervals
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [VersionIntervals] -&gt; ShowS
$cshowList :: [VersionIntervals] -&gt; ShowS
show :: VersionIntervals -&gt; String
$cshow :: VersionIntervals -&gt; String
showsPrec :: Int -&gt; VersionIntervals -&gt; ShowS
$cshowsPrec :: Int -&gt; VersionIntervals -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Typeable.Internal.html#Typeable"><span class="hs-identifier hs-type">Typeable</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-82"></span><span>
</span><span id="line-83"></span><span class="hs-comment">-- | Inspect the list of version intervals.</span><span>
</span><span id="line-84"></span><span class="hs-comment">--</span><span>
</span><span id="line-85"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#versionIntervals"><span class="hs-identifier hs-type">versionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-86"></span><span id="versionIntervals"><span class="annot"><span class="annottext">versionIntervals :: VersionIntervals -&gt; [VersionInterval]
</span><a href="Distribution.Types.VersionInterval.html#versionIntervals"><span class="hs-identifier hs-var hs-var">versionIntervals</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679632155"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632155"><span class="hs-identifier hs-var">is</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632155"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-87"></span><span>
</span><span id="line-88"></span><span class="hs-keyword">type</span><span> </span><span id="VersionInterval"><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-var">VersionInterval</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span class="hs-keyword">data</span><span> </span><span id="LowerBound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>                </span><span id="LowerBound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#Bound"><span class="hs-identifier hs-type">Bound</span></a></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679632148"><span id="local-6989586621679632152"><span class="annot"><span class="annottext">LowerBound -&gt; LowerBound -&gt; Bool
(LowerBound -&gt; LowerBound -&gt; Bool)
-&gt; (LowerBound -&gt; LowerBound -&gt; Bool) -&gt; Eq LowerBound
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: LowerBound -&gt; LowerBound -&gt; Bool
$c/= :: LowerBound -&gt; LowerBound -&gt; Bool
== :: LowerBound -&gt; LowerBound -&gt; Bool
$c== :: LowerBound -&gt; LowerBound -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679632138"><span id="local-6989586621679632140"><span id="local-6989586621679632146"><span class="annot"><span class="annottext">Int -&gt; LowerBound -&gt; ShowS
[LowerBound] -&gt; ShowS
LowerBound -&gt; String
(Int -&gt; LowerBound -&gt; ShowS)
-&gt; (LowerBound -&gt; String)
-&gt; ([LowerBound] -&gt; ShowS)
-&gt; Show LowerBound
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [LowerBound] -&gt; ShowS
$cshowList :: [LowerBound] -&gt; ShowS
show :: LowerBound -&gt; String
$cshow :: LowerBound -&gt; String
showsPrec :: Int -&gt; LowerBound -&gt; ShowS
$cshowsPrec :: Int -&gt; LowerBound -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-90"></span><span class="hs-keyword">data</span><span> </span><span id="UpperBound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-var">UpperBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="NoUpperBound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="UpperBound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-var">UpperBound</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span> </span><span class="hs-glyph">!</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#Bound"><span class="hs-identifier hs-type">Bound</span></a></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679632130"><span id="local-6989586621679632134"><span class="annot"><span class="annottext">UpperBound -&gt; UpperBound -&gt; Bool
(UpperBound -&gt; UpperBound -&gt; Bool)
-&gt; (UpperBound -&gt; UpperBound -&gt; Bool) -&gt; Eq UpperBound
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: UpperBound -&gt; UpperBound -&gt; Bool
$c/= :: UpperBound -&gt; UpperBound -&gt; Bool
== :: UpperBound -&gt; UpperBound -&gt; Bool
$c== :: UpperBound -&gt; UpperBound -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679632121"><span id="local-6989586621679632123"><span id="local-6989586621679632128"><span class="annot"><span class="annottext">Int -&gt; UpperBound -&gt; ShowS
[UpperBound] -&gt; ShowS
UpperBound -&gt; String
(Int -&gt; UpperBound -&gt; ShowS)
-&gt; (UpperBound -&gt; String)
-&gt; ([UpperBound] -&gt; ShowS)
-&gt; Show UpperBound
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [UpperBound] -&gt; ShowS
$cshowList :: [UpperBound] -&gt; ShowS
show :: UpperBound -&gt; String
$cshow :: UpperBound -&gt; String
showsPrec :: Int -&gt; UpperBound -&gt; ShowS
$cshowsPrec :: Int -&gt; UpperBound -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-91"></span><span class="hs-keyword">data</span><span> </span><span id="Bound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#Bound"><span class="hs-identifier hs-var">Bound</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span id="ExclusiveBound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="InclusiveBound"><span class="annot"><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span></span><span>          </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679632115"><span id="local-6989586621679632117"><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
(Bound -&gt; Bound -&gt; Bool) -&gt; (Bound -&gt; Bound -&gt; Bool) -&gt; Eq Bound
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Bound -&gt; Bound -&gt; Bool
$c/= :: Bound -&gt; Bound -&gt; Bool
== :: Bound -&gt; Bound -&gt; Bool
$c== :: Bound -&gt; Bound -&gt; Bool
</span><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></span></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679632109"><span id="local-6989586621679632111"><span id="local-6989586621679632113"><span class="annot"><span class="annottext">Int -&gt; Bound -&gt; ShowS
[Bound] -&gt; ShowS
Bound -&gt; String
(Int -&gt; Bound -&gt; ShowS)
-&gt; (Bound -&gt; String) -&gt; ([Bound] -&gt; ShowS) -&gt; Show Bound
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Bound] -&gt; ShowS
$cshowList :: [Bound] -&gt; ShowS
show :: Bound -&gt; String
$cshow :: Bound -&gt; String
showsPrec :: Int -&gt; Bound -&gt; ShowS
$cshowsPrec :: Int -&gt; Bound -&gt; ShowS
</span><a href="../../base/src/GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-92"></span><span>
</span><span id="line-93"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#minLowerBound"><span class="hs-identifier hs-type">minLowerBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span>
</span><span id="line-94"></span><span id="minLowerBound"><span class="annot"><span class="annottext">minLowerBound :: LowerBound
</span><a href="Distribution.Types.VersionInterval.html#minLowerBound"><span class="hs-identifier hs-var hs-var">minLowerBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; LowerBound
</span><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#isVersion0"><span class="hs-identifier hs-type">isVersion0</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-97"></span><span id="isVersion0"><span class="annot"><span class="annottext">isVersion0 :: Version -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#isVersion0"><span class="hs-identifier hs-var hs-var">isVersion0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">(==)</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="Distribution.Types.Version.html#version0"><span class="hs-identifier hs-var">version0</span></a></span><span>
</span><span id="line-98"></span><span>
</span><span id="line-99"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679632090"><span id="local-6989586621679632092"><span id="local-6989586621679632094"><span id="local-6989586621679632096"><span id="local-6989586621679632099"><span id="local-6989586621679632101"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-100"></span><span>  </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632085"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632085"><span class="hs-identifier hs-var">ver</span></a></span></span><span> </span><span id="local-6989586621679632084"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632084"><span class="hs-identifier hs-var">bound</span></a></span></span><span> </span><span id="local-6989586621679632083"><span class="annot"><span class="annottext">&lt;= :: LowerBound -&gt; LowerBound -&gt; Bool
</span><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;=</span></span></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632081"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632081"><span class="hs-identifier hs-var">ver'</span></a></span></span><span> </span><span id="local-6989586621679632080"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632080"><span class="hs-identifier hs-var">bound'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632085"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632081"><span class="hs-identifier hs-var">ver'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-101"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-102"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632084"><span class="hs-identifier hs-var">bound</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632080"><span class="hs-identifier hs-var">bound'</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-103"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-104"></span><span>
</span><span id="line-105"></span><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679632062"><span id="local-6989586621679632064"><span id="local-6989586621679632066"><span id="local-6989586621679632068"><span id="local-6989586621679632071"><span id="local-6989586621679632073"><span class="annot"><span class="hs-identifier hs-type">Ord</span></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span></span></span></span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-106"></span><span>  </span><span class="annot"><span class="annottext">UpperBound
</span><span class="hs-identifier">_</span></span><span>            </span><span id="local-6989586621679632058"><span class="annot"><span class="annottext">&lt;= :: UpperBound -&gt; UpperBound -&gt; Bool
</span><a href="#local-6989586621679632058"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;=</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-107"></span><span>  </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span> </span><span class="annot"><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-108"></span><span>  </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679632057"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632057"><span class="hs-identifier hs-var">ver</span></a></span></span><span> </span><span id="local-6989586621679632056"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632056"><span class="hs-identifier hs-var">bound</span></a></span></span><span> </span><span class="annot"><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679632055"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632055"><span class="hs-identifier hs-var">ver'</span></a></span></span><span> </span><span id="local-6989586621679632054"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632054"><span class="hs-identifier hs-var">bound'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Ordering
forall a. Ord a =&gt; a -&gt; a -&gt; Ordering
</span><span class="hs-identifier hs-var">compare</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632057"><span class="hs-identifier hs-var">ver</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632055"><span class="hs-identifier hs-var">ver'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-109"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">LT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-110"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">EQ</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632056"><span class="hs-identifier hs-var">bound</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632054"><span class="hs-identifier hs-var">bound'</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>    </span><span class="annot"><span class="annottext">Ordering
</span><span class="hs-identifier hs-var">GT</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-112"></span><span>
</span><span id="line-113"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#invariant"><span class="hs-identifier hs-type">invariant</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-114"></span><span id="invariant"><span class="annot"><span class="annottext">invariant :: VersionIntervals -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#invariant"><span class="hs-identifier hs-var hs-var">invariant</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679632052"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632052"><span class="hs-identifier hs-var">intervals</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(VersionInterval -&gt; Bool) -&gt; [VersionInterval] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#validInterval"><span class="hs-identifier hs-var">validInterval</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632052"><span class="hs-identifier hs-var">intervals</span></a></span><span>
</span><span id="line-115"></span><span>                                      </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">((VersionInterval, VersionInterval) -&gt; Bool)
-&gt; [(VersionInterval, VersionInterval)] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">(VersionInterval, VersionInterval) -&gt; Bool
</span><a href="#local-6989586621679632049"><span class="hs-identifier hs-var">doesNotTouch'</span></a></span><span> </span><span class="annot"><span class="annottext">[(VersionInterval, VersionInterval)]
</span><a href="#local-6989586621679632048"><span class="hs-identifier hs-var">adjacentIntervals</span></a></span><span>
</span><span id="line-116"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-117"></span><span>    </span><span class="annot"><a href="#local-6989586621679632049"><span class="hs-identifier hs-type">doesNotTouch'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-118"></span><span>    </span><span id="local-6989586621679632049"><span class="annot"><span class="annottext">doesNotTouch' :: (VersionInterval, VersionInterval) -&gt; Bool
</span><a href="#local-6989586621679632049"><span class="hs-identifier hs-var hs-var">doesNotTouch'</span></a></span></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679632047"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679632047"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679632046"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679632046"><span class="hs-identifier hs-var">l'</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">UpperBound
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#doesNotTouch"><span class="hs-identifier hs-var">doesNotTouch</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679632047"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679632046"><span class="hs-identifier hs-var">l'</span></a></span><span>
</span><span id="line-119"></span><span>
</span><span id="line-120"></span><span>    </span><span class="annot"><a href="#local-6989586621679632048"><span class="hs-identifier hs-type">adjacentIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-121"></span><span>    </span><span id="local-6989586621679632048"><span class="annot"><span class="annottext">adjacentIntervals :: [(VersionInterval, VersionInterval)]
</span><a href="#local-6989586621679632048"><span class="hs-identifier hs-var hs-var">adjacentIntervals</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632052"><span class="hs-identifier hs-var">intervals</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-122"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-123"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><span class="hs-identifier">_</span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679632044"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632044"><span class="hs-identifier hs-var">tl</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
-&gt; [VersionInterval] -&gt; [(VersionInterval, VersionInterval)]
forall a b. [a] -&gt; [b] -&gt; [(a, b)]
</span><a href="../../base/src/GHC.List.html#zip"><span class="hs-identifier hs-var">zip</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632052"><span class="hs-identifier hs-var">intervals</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632044"><span class="hs-identifier hs-var">tl</span></a></span><span>
</span><span id="line-124"></span><span>
</span><span id="line-125"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#checkInvariant"><span class="hs-identifier hs-type">checkInvariant</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-126"></span><span id="checkInvariant"><span class="annot"><span class="annottext">checkInvariant :: VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#checkInvariant"><span class="hs-identifier hs-var hs-var">checkInvariant</span></a></span></span><span> </span><span id="local-6989586621679632042"><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679632042"><span class="hs-identifier hs-var">is</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; VersionIntervals -&gt; VersionIntervals
forall a. HasCallStack =&gt; Bool -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#assert"><span class="hs-identifier hs-var hs-var">assert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionIntervals -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#invariant"><span class="hs-identifier hs-var">invariant</span></a></span><span> </span><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679632042"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679632042"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-127"></span><span>
</span><span id="line-128"></span><span class="hs-comment">-- | Directly construct a 'VersionIntervals' from a list of intervals.</span><span>
</span><span id="line-129"></span><span class="hs-comment">--</span><span>
</span><span id="line-130"></span><span class="hs-comment">-- In @Cabal-2.2@ the 'Maybe' is dropped from the result type.</span><span>
</span><span id="line-131"></span><span class="hs-comment">--</span><span>
</span><span id="line-132"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#mkVersionIntervals"><span class="hs-identifier hs-type">mkVersionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-133"></span><span id="mkVersionIntervals"><span class="annot"><span class="annottext">mkVersionIntervals :: [VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#mkVersionIntervals"><span class="hs-identifier hs-var hs-var">mkVersionIntervals</span></a></span></span><span> </span><span id="local-6989586621679632041"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632041"><span class="hs-identifier hs-var">intervals</span></a></span></span><span>
</span><span id="line-134"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">VersionIntervals -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#invariant"><span class="hs-identifier hs-var">invariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632041"><span class="hs-identifier hs-var">intervals</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632041"><span class="hs-identifier hs-var">intervals</span></a></span><span>
</span><span id="line-135"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-136"></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#checkInvariant"><span class="hs-identifier hs-var">checkInvariant</span></a></span><span>
</span><span id="line-137"></span><span>        </span><span class="annot"><span class="annottext">(VersionIntervals -&gt; VersionIntervals)
-&gt; ([VersionInterval] -&gt; VersionIntervals)
-&gt; [VersionInterval]
-&gt; VersionIntervals
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(VersionIntervals -&gt; VersionInterval -&gt; VersionIntervals)
-&gt; VersionIntervals -&gt; [VersionInterval] -&gt; VersionIntervals
forall (t :: * -&gt; *) b a.
Foldable t =&gt;
(b -&gt; a -&gt; b) -&gt; b -&gt; t a -&gt; b
</span><a href="../../base/src/Data.Foldable.html#foldl%27"><span class="hs-identifier hs-var">foldl'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(VersionInterval -&gt; VersionIntervals -&gt; VersionIntervals)
-&gt; VersionIntervals -&gt; VersionInterval -&gt; VersionIntervals
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#insertInterval"><span class="hs-identifier hs-var">insertInterval</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>        </span><span class="annot"><span class="annottext">([VersionInterval] -&gt; VersionIntervals)
-&gt; ([VersionInterval] -&gt; [VersionInterval])
-&gt; [VersionInterval]
-&gt; VersionIntervals
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(VersionInterval -&gt; Bool) -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#validInterval"><span class="hs-identifier hs-var">validInterval</span></a></span><span>
</span><span id="line-139"></span><span>        </span><span class="annot"><span class="annottext">([VersionInterval] -&gt; VersionIntervals)
-&gt; [VersionInterval] -&gt; VersionIntervals
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632041"><span class="hs-identifier hs-var">intervals</span></a></span><span>
</span><span id="line-140"></span><span>
</span><span id="line-141"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#insertInterval"><span class="hs-identifier hs-type">insertInterval</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-142"></span><span id="insertInterval"><span class="annot"><span class="annottext">insertInterval :: VersionInterval -&gt; VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#insertInterval"><span class="hs-identifier hs-var hs-var">insertInterval</span></a></span></span><span> </span><span id="local-6989586621679632037"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679632037"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span id="local-6989586621679632036"><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679632036"><span class="hs-identifier hs-var">is</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#unionVersionIntervals"><span class="hs-identifier hs-var">unionVersionIntervals</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679632037"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679632036"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-143"></span><span>
</span><span id="line-144"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#validInterval"><span class="hs-identifier hs-type">validInterval</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-145"></span><span id="validInterval"><span class="annot"><span class="annottext">validInterval :: VersionInterval -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#validInterval"><span class="hs-identifier hs-var hs-var">validInterval</span></a></span></span><span> </span><span id="local-6989586621679632035"><span class="annot"><span class="annottext">i :: VersionInterval
</span><a href="#local-6989586621679632035"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679632034"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679632034"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679632033"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679632033"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; Bool
</span><a href="#local-6989586621679632032"><span class="hs-identifier hs-var">validLower</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679632034"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; Bool
</span><a href="#local-6989586621679632031"><span class="hs-identifier hs-var">validUpper</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679632033"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#nonEmpty"><span class="hs-identifier hs-var">nonEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679632035"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-146"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-147"></span><span>    </span><span id="local-6989586621679632032"><span class="annot"><span class="annottext">validLower :: LowerBound -&gt; Bool
</span><a href="#local-6989586621679632032"><span class="hs-identifier hs-var hs-var">validLower</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632029"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632029"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bool
</span><a href="Distribution.Types.Version.html#validVersion"><span class="hs-identifier hs-var">validVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632029"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-148"></span><span>    </span><span id="local-6989586621679632031"><span class="annot"><span class="annottext">validUpper :: UpperBound -&gt; Bool
</span><a href="#local-6989586621679632031"><span class="hs-identifier hs-var hs-var">validUpper</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-149"></span><span>    </span><span class="annot"><a href="#local-6989586621679632031"><span class="hs-identifier hs-var">validUpper</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679632027"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632027"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bool
</span><a href="Distribution.Types.Version.html#validVersion"><span class="hs-identifier hs-var">validVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632027"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-150"></span><span>
</span><span id="line-151"></span><span class="hs-comment">-- Check an interval is non-empty</span><span>
</span><span id="line-152"></span><span class="hs-comment">--</span><span>
</span><span id="line-153"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#nonEmpty"><span class="hs-identifier hs-type">nonEmpty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-154"></span><span id="nonEmpty"><span class="annot"><span class="annottext">nonEmpty :: VersionInterval -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#nonEmpty"><span class="hs-identifier hs-var hs-var">nonEmpty</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span>               </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span>   </span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-155"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#nonEmpty"><span class="hs-identifier hs-var">nonEmpty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632026"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632026"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679632025"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632025"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679632024"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632024"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621679632023"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632023"><span class="hs-identifier hs-var">ub</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-156"></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632026"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632024"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632026"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632024"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632025"><span class="hs-identifier hs-var">lb</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632023"><span class="hs-identifier hs-var">ub</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>
</span><span id="line-158"></span><span class="hs-comment">-- Check an upper bound does not intersect, or even touch a lower bound:</span><span>
</span><span id="line-159"></span><span class="hs-comment">--</span><span>
</span><span id="line-160"></span><span class="hs-comment">--   ---|      or  ---)     but not  ---]     or  ---)     or  ---]</span><span>
</span><span id="line-161"></span><span class="hs-comment">--       |---         (---              (---         [---         [---</span><span>
</span><span id="line-162"></span><span class="hs-comment">--</span><span>
</span><span id="line-163"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#doesNotTouch"><span class="hs-identifier hs-type">doesNotTouch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-164"></span><span id="doesNotTouch"><span class="annot"><span class="annottext">doesNotTouch :: UpperBound -&gt; LowerBound -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#doesNotTouch"><span class="hs-identifier hs-var hs-var">doesNotTouch</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-165"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#doesNotTouch"><span class="hs-identifier hs-var">doesNotTouch</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679632020"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632020"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621679632019"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632019"><span class="hs-identifier hs-var">ub</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632018"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632018"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679632017"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632017"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-166"></span><span>      </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632020"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span>  </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632018"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-167"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632020"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632018"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632019"><span class="hs-identifier hs-var">ub</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632017"><span class="hs-identifier hs-var">lb</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="hs-comment">-- | Check an upper bound does not intersect a lower bound:</span><span>
</span><span id="line-170"></span><span class="hs-comment">--</span><span>
</span><span id="line-171"></span><span class="hs-comment">--   ---|      or  ---)     or  ---]     or  ---)     but not  ---]</span><span>
</span><span id="line-172"></span><span class="hs-comment">--       |---         (---         (---         [---              [---</span><span>
</span><span id="line-173"></span><span class="hs-comment">--</span><span>
</span><span id="line-174"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#doesNotIntersect"><span class="hs-identifier hs-type">doesNotIntersect</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-175"></span><span id="doesNotIntersect"><span class="annot"><span class="annottext">doesNotIntersect :: UpperBound -&gt; LowerBound -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#doesNotIntersect"><span class="hs-identifier hs-var hs-var">doesNotIntersect</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-176"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#doesNotIntersect"><span class="hs-identifier hs-var">doesNotIntersect</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679632015"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632015"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span id="local-6989586621679632014"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632014"><span class="hs-identifier hs-var">ub</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632013"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632013"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679632012"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632012"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-177"></span><span>      </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632015"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span>  </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632013"><span class="hs-identifier hs-var">l</span></a></span><span>
</span><span id="line-178"></span><span>  </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632015"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632013"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632014"><span class="hs-identifier hs-var">ub</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679632012"><span class="hs-identifier hs-var">lb</span></a></span><span> </span><span class="annot"><span class="annottext">Bound -&gt; Bound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span>
</span><span id="line-180"></span><span class="hs-comment">-- | Test if a version falls within the version intervals.</span><span>
</span><span id="line-181"></span><span class="hs-comment">--</span><span>
</span><span id="line-182"></span><span class="hs-comment">-- It exists mostly for completeness and testing. It satisfies the following</span><span>
</span><span id="line-183"></span><span class="hs-comment">-- properties:</span><span>
</span><span id="line-184"></span><span class="hs-comment">--</span><span>
</span><span id="line-185"></span><span class="hs-comment">-- &gt; withinIntervals v (toVersionIntervals vr) = withinRange v vr</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- &gt; withinIntervals v ivs = withinRange v (fromVersionIntervals ivs)</span><span>
</span><span id="line-187"></span><span class="hs-comment">--</span><span>
</span><span id="line-188"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#withinIntervals"><span class="hs-identifier hs-type">withinIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-189"></span><span id="withinIntervals"><span class="annot"><span class="annottext">withinIntervals :: Version -&gt; VersionIntervals -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#withinIntervals"><span class="hs-identifier hs-var hs-var">withinIntervals</span></a></span></span><span> </span><span id="local-6989586621679632011"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632011"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679632010"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632010"><span class="hs-identifier hs-var">intervals</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(VersionInterval -&gt; Bool) -&gt; [VersionInterval] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; Bool
</span><a href="#local-6989586621679632008"><span class="hs-identifier hs-var">withinInterval</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679632010"><span class="hs-identifier hs-var">intervals</span></a></span><span>
</span><span id="line-190"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-191"></span><span>    </span><span id="local-6989586621679632008"><span class="annot"><span class="annottext">withinInterval :: VersionInterval -&gt; Bool
</span><a href="#local-6989586621679632008"><span class="hs-identifier hs-var hs-var">withinInterval</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679632007"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679632007"><span class="hs-identifier hs-var">lowerBound</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679632006"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679632006"><span class="hs-identifier hs-var">upperBound</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; Bool
</span><a href="#local-6989586621679632005"><span class="hs-identifier hs-var">withinLower</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679632007"><span class="hs-identifier hs-var">lowerBound</span></a></span><span>
</span><span id="line-192"></span><span>                                              </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; Bool
</span><a href="#local-6989586621679632004"><span class="hs-identifier hs-var">withinUpper</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679632006"><span class="hs-identifier hs-var">upperBound</span></a></span><span>
</span><span id="line-193"></span><span>    </span><span id="local-6989586621679632005"><span class="annot"><span class="annottext">withinLower :: LowerBound -&gt; Bool
</span><a href="#local-6989586621679632005"><span class="hs-identifier hs-var hs-var">withinLower</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632001"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632001"><span class="hs-identifier hs-var">v'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632001"><span class="hs-identifier hs-var">v'</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;</span></span><span>  </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632011"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-194"></span><span>    </span><span class="annot"><a href="#local-6989586621679632005"><span class="hs-identifier hs-var">withinLower</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679632000"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632000"><span class="hs-identifier hs-var">v'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632000"><span class="hs-identifier hs-var">v'</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632011"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-195"></span><span>
</span><span id="line-196"></span><span>    </span><span id="local-6989586621679632004"><span class="annot"><span class="annottext">withinUpper :: UpperBound -&gt; Bool
</span><a href="#local-6989586621679632004"><span class="hs-identifier hs-var hs-var">withinUpper</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span>                   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-197"></span><span>    </span><span class="annot"><a href="#local-6989586621679632004"><span class="hs-identifier hs-var">withinUpper</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679631997"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631997"><span class="hs-identifier hs-var">v'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631997"><span class="hs-identifier hs-var">v'</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;</span></span><span>  </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632011"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-198"></span><span>    </span><span class="annot"><a href="#local-6989586621679632004"><span class="hs-identifier hs-var">withinUpper</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679631995"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631995"><span class="hs-identifier hs-var">v'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631995"><span class="hs-identifier hs-var">v'</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&gt;=</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679632011"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-199"></span><span>
</span><span id="line-200"></span><span class="hs-comment">-- | Convert a 'VersionRange' to a sequence of version intervals.</span><span>
</span><span id="line-201"></span><span class="hs-comment">--</span><span>
</span><span id="line-202"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#toVersionIntervals"><span class="hs-identifier hs-type">toVersionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-203"></span><span id="toVersionIntervals"><span class="annot"><span class="annottext">toVersionIntervals :: VersionRange -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#toVersionIntervals"><span class="hs-identifier hs-var hs-var">toVersionIntervals</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(VersionRangeF VersionIntervals -&gt; VersionIntervals)
-&gt; VersionRange -&gt; VersionIntervals
forall a. (VersionRangeF a -&gt; a) -&gt; VersionRange -&gt; a
</span><a href="Distribution.Types.VersionRange.Internal.html#cataVersionRange"><span class="hs-identifier hs-var">cataVersionRange</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRangeF VersionIntervals -&gt; VersionIntervals
</span><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-204"></span><span>    </span><span id="local-6989586621679631993"><span class="annot"><span class="annottext">alg :: VersionRangeF VersionIntervals -&gt; VersionIntervals
</span><a href="#local-6989586621679631993"><span class="hs-identifier hs-var hs-var">alg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#ThisVersionF"><span class="hs-identifier hs-type">ThisVersionF</span></a></span><span> </span><span id="local-6989586621679631991"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631991"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; VersionIntervals
</span><a href="#local-6989586621679631990"><span class="hs-identifier hs-var">chkIvl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; LowerBound
</span><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631991"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; UpperBound
</span><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-var">UpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631991"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-205"></span><span>    </span><span class="annot"><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#LaterVersionF"><span class="hs-identifier hs-type">LaterVersionF</span></a></span><span> </span><span id="local-6989586621679631988"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631988"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>               </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; VersionIntervals
</span><a href="#local-6989586621679631990"><span class="hs-identifier hs-var">chkIvl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; LowerBound
</span><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631988"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>    </span><span class="annot"><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#OrLaterVersionF"><span class="hs-identifier hs-type">OrLaterVersionF</span></a></span><span> </span><span id="local-6989586621679631986"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631986"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>             </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; VersionIntervals
</span><a href="#local-6989586621679631990"><span class="hs-identifier hs-var">chkIvl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; LowerBound
</span><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631986"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-207"></span><span>    </span><span class="annot"><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#EarlierVersionF"><span class="hs-identifier hs-type">EarlierVersionF</span></a></span><span> </span><span id="local-6989586621679631984"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631984"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#isVersion0"><span class="hs-identifier hs-var">isVersion0</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631984"><span class="hs-identifier hs-var">v</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-209"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>                     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; VersionIntervals
</span><a href="#local-6989586621679631990"><span class="hs-identifier hs-var">chkIvl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="Distribution.Types.VersionInterval.html#minLowerBound"><span class="hs-identifier hs-var">minLowerBound</span></a></span><span class="hs-special">,</span><span>               </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; UpperBound
</span><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-var">UpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631984"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-210"></span><span>    </span><span class="annot"><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#OrEarlierVersionF"><span class="hs-identifier hs-type">OrEarlierVersionF</span></a></span><span> </span><span id="local-6989586621679631982"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631982"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>           </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; VersionIntervals
</span><a href="#local-6989586621679631990"><span class="hs-identifier hs-var">chkIvl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="Distribution.Types.VersionInterval.html#minLowerBound"><span class="hs-identifier hs-var">minLowerBound</span></a></span><span class="hs-special">,</span><span>               </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; UpperBound
</span><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-var">UpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631982"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-211"></span><span>    </span><span class="annot"><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#MajorBoundVersionF"><span class="hs-identifier hs-type">MajorBoundVersionF</span></a></span><span> </span><span id="local-6989586621679631980"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631980"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>          </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; VersionIntervals
</span><a href="#local-6989586621679631990"><span class="hs-identifier hs-var">chkIvl</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; LowerBound
</span><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631980"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; UpperBound
</span><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-var">UpperBound</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; Version
</span><a href="Distribution.Types.VersionRange.Internal.html#majorUpperBound"><span class="hs-identifier hs-var">majorUpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631980"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>    </span><span class="annot"><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#UnionVersionRangesF"><span class="hs-identifier hs-type">UnionVersionRangesF</span></a></span><span> </span><span id="local-6989586621679631977"><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631977"><span class="hs-identifier hs-var">v1</span></a></span></span><span> </span><span id="local-6989586621679631976"><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631976"><span class="hs-identifier hs-var">v2</span></a></span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#unionVersionIntervals"><span class="hs-identifier hs-var">unionVersionIntervals</span></a></span><span> </span><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631977"><span class="hs-identifier hs-var">v1</span></a></span><span> </span><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631976"><span class="hs-identifier hs-var">v2</span></a></span><span>
</span><span id="line-213"></span><span>    </span><span class="annot"><a href="#local-6989586621679631993"><span class="hs-identifier hs-var">alg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#IntersectVersionRangesF"><span class="hs-identifier hs-type">IntersectVersionRangesF</span></a></span><span> </span><span id="local-6989586621679631974"><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631974"><span class="hs-identifier hs-var">v1</span></a></span></span><span> </span><span id="local-6989586621679631973"><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631973"><span class="hs-identifier hs-var">v2</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#intersectVersionIntervals"><span class="hs-identifier hs-var">intersectVersionIntervals</span></a></span><span> </span><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631974"><span class="hs-identifier hs-var">v1</span></a></span><span> </span><span class="annot"><span class="annottext">VersionIntervals
</span><a href="#local-6989586621679631973"><span class="hs-identifier hs-var">v2</span></a></span><span>
</span><span id="line-214"></span><span>
</span><span id="line-215"></span><span>    </span><span id="local-6989586621679631990"><span class="annot"><span class="annottext">chkIvl :: VersionInterval -&gt; VersionIntervals
</span><a href="#local-6989586621679631990"><span class="hs-identifier hs-var hs-var">chkIvl</span></a></span></span><span> </span><span id="local-6989586621679631972"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631972"><span class="hs-identifier hs-var">interval</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#checkInvariant"><span class="hs-identifier hs-var">checkInvariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631972"><span class="hs-identifier hs-var">interval</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-216"></span><span>
</span><span id="line-217"></span><span class="hs-comment">-- | Convert a 'VersionIntervals' value back into a 'VersionRange' expression</span><span>
</span><span id="line-218"></span><span class="hs-comment">-- representing the version intervals.</span><span>
</span><span id="line-219"></span><span class="hs-comment">--</span><span>
</span><span id="line-220"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#fromVersionIntervals"><span class="hs-identifier hs-type">fromVersionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionRange.Internal.html#VersionRange"><span class="hs-identifier hs-type">VersionRange</span></a></span><span>
</span><span id="line-221"></span><span id="fromVersionIntervals"><span class="annot"><span class="annottext">fromVersionIntervals :: VersionIntervals -&gt; VersionRange
</span><a href="Distribution.Types.VersionInterval.html#fromVersionIntervals"><span class="hs-identifier hs-var hs-var">fromVersionIntervals</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#noVersion"><span class="hs-identifier hs-var">noVersion</span></a></span><span>
</span><span id="line-222"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#fromVersionIntervals"><span class="hs-identifier hs-var">fromVersionIntervals</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631970"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631970"><span class="hs-identifier hs-var">intervals</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-223"></span><span>    </span><span class="annot"><span class="annottext">(VersionRange -&gt; VersionRange -&gt; VersionRange)
-&gt; [VersionRange] -&gt; VersionRange
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; a -&gt; a) -&gt; t a -&gt; a
</span><a href="../../base/src/Data.Foldable.html#foldr1"><span class="hs-identifier hs-var">Prelude.foldr1</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; VersionRange -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#unionVersionRanges"><span class="hs-identifier hs-var">unionVersionRanges</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; UpperBound -&gt; VersionRange
</span><a href="#local-6989586621679631968"><span class="hs-identifier hs-var">interval</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631967"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631966"><span class="hs-identifier hs-var">u</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631967"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631967"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631966"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631966"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631970"><span class="hs-identifier hs-var">intervals</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-226"></span><span>    </span><span id="local-6989586621679631968"><span class="annot"><span class="annottext">interval :: LowerBound -&gt; UpperBound -&gt; VersionRange
</span><a href="#local-6989586621679631968"><span class="hs-identifier hs-var hs-var">interval</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679631964"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631964"><span class="hs-identifier hs-var">v</span></a></span></span><span>  </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-227"></span><span>             </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679631963"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631963"><span class="hs-identifier hs-var">v'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631964"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; Version -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631963"><span class="hs-identifier hs-var">v'</span></a></span><span>
</span><span id="line-228"></span><span>                 </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#thisVersion"><span class="hs-identifier hs-var">thisVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631964"><span class="hs-identifier hs-var">v</span></a></span><span>
</span><span id="line-229"></span><span>    </span><span class="annot"><a href="#local-6989586621679631968"><span class="hs-identifier hs-var">interval</span></a></span><span> </span><span id="local-6989586621679631961"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631961"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679631960"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631960"><span class="hs-identifier hs-var">u</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; Maybe VersionRange
</span><a href="#local-6989586621679631959"><span class="hs-identifier hs-var">lowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631961"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionRange -&gt; Maybe VersionRange -&gt; VersionRange
</span><a href="#local-6989586621679631958"><span class="hs-operator hs-var">`intersectVersionRanges'`</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; Maybe VersionRange
</span><a href="#local-6989586621679631957"><span class="hs-identifier hs-var">upperBound</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631960"><span class="hs-identifier hs-var">u</span></a></span><span>
</span><span id="line-230"></span><span>
</span><span id="line-231"></span><span>    </span><span id="local-6989586621679631959"><span class="annot"><span class="annottext">lowerBound :: LowerBound -&gt; Maybe VersionRange
</span><a href="#local-6989586621679631959"><span class="hs-identifier hs-var hs-var">lowerBound</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679631956"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631956"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-232"></span><span>                              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#isVersion0"><span class="hs-identifier hs-var">isVersion0</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631956"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe VersionRange
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-233"></span><span>                              </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; Maybe VersionRange
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#orLaterVersion"><span class="hs-identifier hs-var">orLaterVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631956"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-234"></span><span>    </span><span class="annot"><a href="#local-6989586621679631959"><span class="hs-identifier hs-var">lowerBound</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679631954"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631954"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; Maybe VersionRange
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#laterVersion"><span class="hs-identifier hs-var">laterVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631954"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>
</span><span id="line-236"></span><span>    </span><span id="local-6989586621679631957"><span class="annot"><span class="annottext">upperBound :: UpperBound -&gt; Maybe VersionRange
</span><a href="#local-6989586621679631957"><span class="hs-identifier hs-var hs-var">upperBound</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span>                  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe VersionRange
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-237"></span><span>    </span><span class="annot"><a href="#local-6989586621679631957"><span class="hs-identifier hs-var">upperBound</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679631952"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631952"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; Maybe VersionRange
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#orEarlierVersion"><span class="hs-identifier hs-var">orEarlierVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631952"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-238"></span><span>    </span><span class="annot"><a href="#local-6989586621679631957"><span class="hs-identifier hs-var">upperBound</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679631950"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631950"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; Maybe VersionRange
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Version -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#earlierVersion"><span class="hs-identifier hs-var">earlierVersion</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631950"><span class="hs-identifier hs-var">v</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-239"></span><span>
</span><span id="line-240"></span><span>    </span><span id="local-6989586621679631958"><span class="annot"><span class="annottext">intersectVersionRanges' :: Maybe VersionRange -&gt; Maybe VersionRange -&gt; VersionRange
</span><a href="#local-6989586621679631958"><span class="hs-identifier hs-var hs-var">intersectVersionRanges'</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe VersionRange
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionRange
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#anyVersion"><span class="hs-identifier hs-var">anyVersion</span></a></span><span>
</span><span id="line-241"></span><span>    </span><span class="annot"><a href="#local-6989586621679631958"><span class="hs-identifier hs-var">intersectVersionRanges'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631947"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631947"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe VersionRange
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631947"><span class="hs-identifier hs-var">vr</span></a></span><span>
</span><span id="line-242"></span><span>    </span><span class="annot"><a href="#local-6989586621679631958"><span class="hs-identifier hs-var">intersectVersionRanges'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionRange
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631946"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631946"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631946"><span class="hs-identifier hs-var">vr</span></a></span><span>
</span><span id="line-243"></span><span>    </span><span class="annot"><a href="#local-6989586621679631958"><span class="hs-identifier hs-var">intersectVersionRanges'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631945"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631945"><span class="hs-identifier hs-var">vr</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631944"><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631944"><span class="hs-identifier hs-var">vr'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">VersionRange -&gt; VersionRange -&gt; VersionRange
</span><a href="Distribution.Types.VersionRange.Internal.html#intersectVersionRanges"><span class="hs-identifier hs-var">intersectVersionRanges</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631945"><span class="hs-identifier hs-var">vr</span></a></span><span> </span><span class="annot"><span class="annottext">VersionRange
</span><a href="#local-6989586621679631944"><span class="hs-identifier hs-var">vr'</span></a></span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#unionVersionIntervals"><span class="hs-identifier hs-type">unionVersionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-246"></span><span>                      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-247"></span><span id="unionVersionIntervals"><span class="annot"><span class="annottext">unionVersionIntervals :: VersionIntervals -&gt; VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#unionVersionIntervals"><span class="hs-identifier hs-var hs-var">unionVersionIntervals</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631942"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631942"><span class="hs-identifier hs-var">is0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631941"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631941"><span class="hs-identifier hs-var">is'0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-248"></span><span>  </span><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#checkInvariant"><span class="hs-identifier hs-var">checkInvariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631940"><span class="hs-identifier hs-var">union</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631942"><span class="hs-identifier hs-var">is0</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631941"><span class="hs-identifier hs-var">is'0</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-249"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-250"></span><span>    </span><span id="local-6989586621679631940"><span class="annot"><span class="annottext">union :: [VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631940"><span class="hs-identifier hs-var hs-var">union</span></a></span></span><span> </span><span id="local-6989586621679631939"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631939"><span class="hs-identifier hs-var">is</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631939"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-251"></span><span>    </span><span class="annot"><a href="#local-6989586621679631940"><span class="hs-identifier hs-var">union</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span id="local-6989586621679631938"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631938"><span class="hs-identifier hs-var">is'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631938"><span class="hs-identifier hs-var">is'</span></a></span><span>
</span><span id="line-252"></span><span>    </span><span class="annot"><a href="#local-6989586621679631940"><span class="hs-identifier hs-var">union</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631937"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631937"><span class="hs-identifier hs-var">i</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679631936"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631936"><span class="hs-identifier hs-var">is</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631935"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631935"><span class="hs-identifier hs-var">i'</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679631934"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631934"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VersionInterval
-&gt; VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><a href="Distribution.Types.VersionInterval.html#unionInterval"><span class="hs-identifier hs-var">unionInterval</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631937"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631935"><span class="hs-identifier hs-var">i'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-253"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span class="annot"><span class="annottext">Maybe VersionInterval
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631937"><span class="hs-identifier hs-var">i</span></a></span><span>  </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631940"><span class="hs-identifier hs-var">union</span></a></span><span>      </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631936"><span class="hs-identifier hs-var">is</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631935"><span class="hs-identifier hs-var">i'</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631934"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-254"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631932"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631932"><span class="hs-identifier hs-var">i''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>      </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631940"><span class="hs-identifier hs-var">union</span></a></span><span>      </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631936"><span class="hs-identifier hs-var">is</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631932"><span class="hs-identifier hs-var">i''</span></a></span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631934"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-255"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631935"><span class="hs-identifier hs-var">i'</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631940"><span class="hs-identifier hs-var">union</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631937"><span class="hs-identifier hs-var">i</span></a></span><span>  </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631936"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631934"><span class="hs-identifier hs-var">is'</span></a></span><span>
</span><span id="line-256"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631931"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631931"><span class="hs-identifier hs-var">i''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>      </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631940"><span class="hs-identifier hs-var">union</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631931"><span class="hs-identifier hs-var">i''</span></a></span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631936"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span>      </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631934"><span class="hs-identifier hs-var">is'</span></a></span><span>
</span><span id="line-257"></span><span>
</span><span id="line-258"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#unionInterval"><span class="hs-identifier hs-type">unionInterval</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span>
</span><span id="line-259"></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-260"></span><span id="unionInterval"><span class="annot"><span class="annottext">unionInterval :: VersionInterval
-&gt; VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><a href="Distribution.Types.VersionInterval.html#unionInterval"><span class="hs-identifier hs-var hs-var">unionInterval</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631930"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631930"><span class="hs-identifier hs-var">lower</span></a></span></span><span> </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631929"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631929"><span class="hs-identifier hs-var">upper</span></a></span></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631928"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631928"><span class="hs-identifier hs-var">lower'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631927"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631927"><span class="hs-identifier hs-var">upper'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-261"></span><span>
</span><span id="line-262"></span><span>  </span><span class="hs-comment">-- Non-intersecting intervals with the left interval ending first</span><span>
</span><span id="line-263"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631929"><span class="hs-identifier hs-var">upper</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#doesNotTouch"><span class="hs-operator hs-var">`doesNotTouch`</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631928"><span class="hs-identifier hs-var">lower'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-264"></span><span>
</span><span id="line-265"></span><span>  </span><span class="hs-comment">-- Non-intersecting intervals with the right interval first</span><span>
</span><span id="line-266"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631927"><span class="hs-identifier hs-var">upper'</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#doesNotTouch"><span class="hs-operator hs-var">`doesNotTouch`</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631930"><span class="hs-identifier hs-var">lower</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-267"></span><span>
</span><span id="line-268"></span><span>  </span><span class="hs-comment">-- Complete or partial overlap, with the left interval ending first</span><span>
</span><span id="line-269"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631929"><span class="hs-identifier hs-var">upper</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; UpperBound -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631927"><span class="hs-identifier hs-var">upper'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631926"><span class="hs-identifier hs-var">lowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><span class="hs-operator hs-var">`seq`</span></span><span>
</span><span id="line-270"></span><span>                      </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval -&gt; Maybe VersionInterval
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631926"><span class="hs-identifier hs-var">lowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631927"><span class="hs-identifier hs-var">upper'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>
</span><span id="line-272"></span><span>  </span><span class="hs-comment">-- Complete or partial overlap, with the left interval ending first</span><span>
</span><span id="line-273"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631926"><span class="hs-identifier hs-var">lowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><span class="hs-operator hs-var">`seq`</span></span><span>
</span><span id="line-274"></span><span>                </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval -&gt; Maybe VersionInterval
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631926"><span class="hs-identifier hs-var">lowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631929"><span class="hs-identifier hs-var">upper</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-276"></span><span>    </span><span id="local-6989586621679631926"><span class="annot"><span class="annottext">lowerBound :: LowerBound
</span><a href="#local-6989586621679631926"><span class="hs-identifier hs-var hs-var">lowerBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; LowerBound -&gt; LowerBound
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">min</span></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631930"><span class="hs-identifier hs-var">lower</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631928"><span class="hs-identifier hs-var">lower'</span></a></span><span>
</span><span id="line-277"></span><span>
</span><span id="line-278"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#intersectVersionIntervals"><span class="hs-identifier hs-type">intersectVersionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-279"></span><span>                          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-280"></span><span id="intersectVersionIntervals"><span class="annot"><span class="annottext">intersectVersionIntervals :: VersionIntervals -&gt; VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#intersectVersionIntervals"><span class="hs-identifier hs-var hs-var">intersectVersionIntervals</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631923"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631923"><span class="hs-identifier hs-var">is0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631922"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631922"><span class="hs-identifier hs-var">is'0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-281"></span><span>  </span><span class="annot"><span class="annottext">VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#checkInvariant"><span class="hs-identifier hs-var">checkInvariant</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631921"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631923"><span class="hs-identifier hs-var">is0</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631922"><span class="hs-identifier hs-var">is'0</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-283"></span><span>    </span><span id="local-6989586621679631921"><span class="annot"><span class="annottext">intersect :: [VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631921"><span class="hs-identifier hs-var hs-var">intersect</span></a></span></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-284"></span><span>    </span><span class="annot"><a href="#local-6989586621679631921"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-285"></span><span>    </span><span class="annot"><a href="#local-6989586621679631921"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631920"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631920"><span class="hs-identifier hs-var">i</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679631919"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631919"><span class="hs-identifier hs-var">is</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631918"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631918"><span class="hs-identifier hs-var">i'</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679631917"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631917"><span class="hs-identifier hs-var">is'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">VersionInterval
-&gt; VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><a href="Distribution.Types.VersionInterval.html#intersectInterval"><span class="hs-identifier hs-var">intersectInterval</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631920"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631918"><span class="hs-identifier hs-var">i'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-286"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span class="annot"><span class="annottext">Maybe VersionInterval
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span>       </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631921"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631919"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631918"><span class="hs-identifier hs-var">i'</span></a></span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631917"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span>  </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631915"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631915"><span class="hs-identifier hs-var">i''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631915"><span class="hs-identifier hs-var">i''</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631921"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631919"><span class="hs-identifier hs-var">is</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631918"><span class="hs-identifier hs-var">i'</span></a></span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631917"><span class="hs-identifier hs-var">is'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-288"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span>       </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631921"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631920"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631919"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631917"><span class="hs-identifier hs-var">is'</span></a></span><span>
</span><span id="line-289"></span><span>      </span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679631914"><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631914"><span class="hs-identifier hs-var">i''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631914"><span class="hs-identifier hs-var">i''</span></a></span><span> </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631921"><span class="hs-identifier hs-var">intersect</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval
</span><a href="#local-6989586621679631920"><span class="hs-identifier hs-var">i</span></a></span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631919"><span class="hs-identifier hs-var">is</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631917"><span class="hs-identifier hs-var">is'</span></a></span><span>
</span><span id="line-290"></span><span>
</span><span id="line-291"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#intersectInterval"><span class="hs-identifier hs-type">intersectInterval</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span>
</span><span id="line-292"></span><span>                  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionInterval"><span class="hs-identifier hs-type">VersionInterval</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-293"></span><span id="intersectInterval"><span class="annot"><span class="annottext">intersectInterval :: VersionInterval
-&gt; VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><a href="Distribution.Types.VersionInterval.html#intersectInterval"><span class="hs-identifier hs-var hs-var">intersectInterval</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631913"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631913"><span class="hs-identifier hs-var">lower</span></a></span></span><span> </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631912"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631912"><span class="hs-identifier hs-var">upper</span></a></span></span><span> </span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631911"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631911"><span class="hs-identifier hs-var">lower'</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631910"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631910"><span class="hs-identifier hs-var">upper'</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span>  </span><span class="hs-comment">-- Non-intersecting intervals with the left interval ending first</span><span>
</span><span id="line-296"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631912"><span class="hs-identifier hs-var">upper</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#doesNotIntersect"><span class="hs-operator hs-var">`doesNotIntersect`</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631911"><span class="hs-identifier hs-var">lower'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-297"></span><span>
</span><span id="line-298"></span><span>  </span><span class="hs-comment">-- Non-intersecting intervals with the right interval first</span><span>
</span><span id="line-299"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631910"><span class="hs-identifier hs-var">upper'</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound -&gt; Bool
</span><a href="Distribution.Types.VersionInterval.html#doesNotIntersect"><span class="hs-operator hs-var">`doesNotIntersect`</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631913"><span class="hs-identifier hs-var">lower</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe VersionInterval
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-300"></span><span>
</span><span id="line-301"></span><span>  </span><span class="hs-comment">-- Complete or partial overlap, with the left interval ending first</span><span>
</span><span id="line-302"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631912"><span class="hs-identifier hs-var">upper</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; UpperBound -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">&lt;=</span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631910"><span class="hs-identifier hs-var">upper'</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631909"><span class="hs-identifier hs-var">lowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><span class="hs-operator hs-var">`seq`</span></span><span>
</span><span id="line-303"></span><span>                      </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval -&gt; Maybe VersionInterval
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631909"><span class="hs-identifier hs-var">lowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631912"><span class="hs-identifier hs-var">upper</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span>  </span><span class="hs-comment">-- Complete or partial overlap, with the right interval ending first</span><span>
</span><span id="line-306"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631909"><span class="hs-identifier hs-var">lowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
</span><span class="hs-operator hs-var">`seq`</span></span><span>
</span><span id="line-307"></span><span>                </span><span class="annot"><span class="annottext">Maybe VersionInterval
-&gt; Either (Maybe VersionInterval) (Maybe VersionInterval)
forall a b. b -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-var">Right</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">VersionInterval -&gt; Maybe VersionInterval
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631909"><span class="hs-identifier hs-var">lowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631910"><span class="hs-identifier hs-var">upper'</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-308"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-309"></span><span>    </span><span id="local-6989586621679631909"><span class="annot"><span class="annottext">lowerBound :: LowerBound
</span><a href="#local-6989586621679631909"><span class="hs-identifier hs-var hs-var">lowerBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; LowerBound -&gt; LowerBound
forall a. Ord a =&gt; a -&gt; a -&gt; a
</span><span class="hs-identifier hs-var">max</span></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631913"><span class="hs-identifier hs-var">lower</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631911"><span class="hs-identifier hs-var">lower'</span></a></span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#invertVersionIntervals"><span class="hs-identifier hs-type">invertVersionIntervals</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-312"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-313"></span><span id="invertVersionIntervals"><span class="annot"><span class="annottext">invertVersionIntervals :: VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#invertVersionIntervals"><span class="hs-identifier hs-var hs-var">invertVersionIntervals</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631906"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631906"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-314"></span><span>    </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631906"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-315"></span><span>      </span><span class="hs-comment">-- Empty interval set</span><span>
</span><span id="line-316"></span><span>      </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631905"><span class="hs-identifier hs-var">noLowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-317"></span><span>      </span><span class="hs-comment">-- Interval with no lower bound</span><span>
</span><span id="line-318"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679631904"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631904"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631903"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631903"><span class="hs-identifier hs-var">ub</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679631902"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631902"><span class="hs-identifier hs-var">more</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631904"><span class="hs-identifier hs-var">lb</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; LowerBound -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631905"><span class="hs-identifier hs-var">noLowerBound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-319"></span><span>        </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="annot"><span class="annottext">([VersionInterval] -&gt; VersionIntervals)
-&gt; [VersionInterval] -&gt; VersionIntervals
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631901"><span class="hs-identifier hs-var">invertVersionIntervals'</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631903"><span class="hs-identifier hs-var">ub</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631902"><span class="hs-identifier hs-var">more</span></a></span><span>
</span><span id="line-320"></span><span>      </span><span class="hs-comment">-- Interval with a lower bound</span><span>
</span><span id="line-321"></span><span>      </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679631900"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631900"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631899"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631899"><span class="hs-identifier hs-var">ub</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679631898"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631898"><span class="hs-identifier hs-var">more</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-322"></span><span>          </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="annot"><span class="annottext">([VersionInterval] -&gt; VersionIntervals)
-&gt; [VersionInterval] -&gt; VersionIntervals
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631905"><span class="hs-identifier hs-var">noLowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; UpperBound
</span><a href="#local-6989586621679631897"><span class="hs-identifier hs-var">invertLowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631900"><span class="hs-identifier hs-var">lb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-323"></span><span>          </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631901"><span class="hs-identifier hs-var">invertVersionIntervals'</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631899"><span class="hs-identifier hs-var">ub</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631898"><span class="hs-identifier hs-var">more</span></a></span><span>
</span><span id="line-324"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-325"></span><span>      </span><span class="hs-comment">-- Invert subsequent version intervals given the upper bound of</span><span>
</span><span id="line-326"></span><span>      </span><span class="hs-comment">-- the intervals already inverted.</span><span>
</span><span id="line-327"></span><span>      </span><span class="annot"><a href="#local-6989586621679631901"><span class="hs-identifier hs-type">invertVersionIntervals'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span>
</span><span id="line-328"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-329"></span><span>                              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-330"></span><span>      </span><span id="local-6989586621679631901"><span class="annot"><span class="annottext">invertVersionIntervals' :: UpperBound -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631901"><span class="hs-identifier hs-var hs-var">invertVersionIntervals'</span></a></span></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-331"></span><span>      </span><span class="annot"><a href="#local-6989586621679631901"><span class="hs-identifier hs-var">invertVersionIntervals'</span></a></span><span> </span><span id="local-6989586621679631896"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631896"><span class="hs-identifier hs-var">ub0</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound
</span><a href="#local-6989586621679631895"><span class="hs-identifier hs-var">invertUpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631896"><span class="hs-identifier hs-var">ub0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-332"></span><span>      </span><span class="annot"><a href="#local-6989586621679631901"><span class="hs-identifier hs-var">invertVersionIntervals'</span></a></span><span> </span><span id="local-6989586621679631894"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631894"><span class="hs-identifier hs-var">ub0</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span id="local-6989586621679631893"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631893"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-333"></span><span>          </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound
</span><a href="#local-6989586621679631895"><span class="hs-identifier hs-var">invertUpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631894"><span class="hs-identifier hs-var">ub0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; UpperBound
</span><a href="#local-6989586621679631897"><span class="hs-identifier hs-var">invertLowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631893"><span class="hs-identifier hs-var">lb</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-334"></span><span>      </span><span class="annot"><a href="#local-6989586621679631901"><span class="hs-identifier hs-var">invertVersionIntervals'</span></a></span><span> </span><span id="local-6989586621679631892"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631892"><span class="hs-identifier hs-var">ub0</span></a></span></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621679631891"><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631891"><span class="hs-identifier hs-var">lb</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679631890"><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631890"><span class="hs-identifier hs-var">ub1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621679631889"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631889"><span class="hs-identifier hs-var">more</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-335"></span><span>          </span><span class="hs-special">(</span><span class="annot"><span class="annottext">UpperBound -&gt; LowerBound
</span><a href="#local-6989586621679631895"><span class="hs-identifier hs-var">invertUpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631892"><span class="hs-identifier hs-var">ub0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LowerBound -&gt; UpperBound
</span><a href="#local-6989586621679631897"><span class="hs-identifier hs-var">invertLowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">LowerBound
</span><a href="#local-6989586621679631891"><span class="hs-identifier hs-var">lb</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-336"></span><span>            </span><span class="annot"><span class="annottext">VersionInterval -&gt; [VersionInterval] -&gt; [VersionInterval]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">UpperBound -&gt; [VersionInterval] -&gt; [VersionInterval]
</span><a href="#local-6989586621679631901"><span class="hs-identifier hs-var">invertVersionIntervals'</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="#local-6989586621679631890"><span class="hs-identifier hs-var">ub1</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631889"><span class="hs-identifier hs-var">more</span></a></span><span>
</span><span id="line-337"></span><span>
</span><span id="line-338"></span><span>      </span><span class="annot"><a href="#local-6989586621679631897"><span class="hs-identifier hs-type">invertLowerBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span>
</span><span id="line-339"></span><span>      </span><span id="local-6989586621679631897"><span class="annot"><span class="annottext">invertLowerBound :: LowerBound -&gt; UpperBound
</span><a href="#local-6989586621679631897"><span class="hs-identifier hs-var hs-var">invertLowerBound</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span> </span><span id="local-6989586621679631888"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631888"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679631887"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679631887"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; UpperBound
</span><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-var">UpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631888"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bound -&gt; Bound
</span><a href="#local-6989586621679631886"><span class="hs-identifier hs-var">invertBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679631887"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-340"></span><span>
</span><span id="line-341"></span><span>      </span><span class="annot"><a href="#local-6989586621679631895"><span class="hs-identifier hs-type">invertUpperBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span>
</span><span id="line-342"></span><span>      </span><span id="local-6989586621679631895"><span class="annot"><span class="annottext">invertUpperBound :: UpperBound -&gt; LowerBound
</span><a href="#local-6989586621679631895"><span class="hs-identifier hs-var hs-var">invertUpperBound</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#UpperBound"><span class="hs-identifier hs-type">UpperBound</span></a></span><span> </span><span id="local-6989586621679631885"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631885"><span class="hs-identifier hs-var">v</span></a></span></span><span> </span><span id="local-6989586621679631884"><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679631884"><span class="hs-identifier hs-var">b</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; LowerBound
</span><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679631885"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bound -&gt; Bound
</span><a href="#local-6989586621679631886"><span class="hs-identifier hs-var">invertBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="#local-6989586621679631884"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-343"></span><span>      </span><span class="annot"><a href="#local-6989586621679631895"><span class="hs-identifier hs-var">invertUpperBound</span></a></span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; LowerBound
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NoUpperBound: unexpected&quot;</span></span><span>
</span><span id="line-344"></span><span>
</span><span id="line-345"></span><span>      </span><span class="annot"><a href="#local-6989586621679631886"><span class="hs-identifier hs-type">invertBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#Bound"><span class="hs-identifier hs-type">Bound</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#Bound"><span class="hs-identifier hs-type">Bound</span></a></span><span>
</span><span id="line-346"></span><span>      </span><span id="local-6989586621679631886"><span class="annot"><span class="annottext">invertBound :: Bound -&gt; Bound
</span><a href="#local-6989586621679631886"><span class="hs-identifier hs-var hs-var">invertBound</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span>
</span><span id="line-347"></span><span>      </span><span class="annot"><a href="#local-6989586621679631886"><span class="hs-identifier hs-var">invertBound</span></a></span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#ExclusiveBound"><span class="hs-identifier hs-var">ExclusiveBound</span></a></span><span>
</span><span id="line-348"></span><span>
</span><span id="line-349"></span><span>      </span><span class="annot"><a href="#local-6989586621679631905"><span class="hs-identifier hs-type">noLowerBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-type">LowerBound</span></a></span><span>
</span><span id="line-350"></span><span>      </span><span id="local-6989586621679631905"><span class="annot"><span class="annottext">noLowerBound :: LowerBound
</span><a href="#local-6989586621679631905"><span class="hs-identifier hs-var hs-var">noLowerBound</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Version -&gt; Bound -&gt; LowerBound
</span><a href="Distribution.Types.VersionInterval.html#LowerBound"><span class="hs-identifier hs-var">LowerBound</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Int] -&gt; Version
</span><a href="Distribution.Types.Version.html#mkVersion"><span class="hs-identifier hs-var">mkVersion</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bound
</span><a href="Distribution.Types.VersionInterval.html#InclusiveBound"><span class="hs-identifier hs-var">InclusiveBound</span></a></span><span>
</span><span id="line-351"></span><span>
</span><span id="line-352"></span><span>
</span><span id="line-353"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#relaxLastInterval"><span class="hs-identifier hs-type">relaxLastInterval</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-354"></span><span id="relaxLastInterval"><span class="annot"><span class="annottext">relaxLastInterval :: VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#relaxLastInterval"><span class="hs-identifier hs-var hs-var">relaxLastInterval</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631882"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631882"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval]
forall {a}. [(a, UpperBound)] -&gt; [(a, UpperBound)]
</span><a href="#local-6989586621679631881"><span class="hs-identifier hs-var">relaxLastInterval'</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631882"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-355"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-356"></span><span>    </span><span id="local-6989586621679631881"><span class="annot"><span class="annottext">relaxLastInterval' :: [(a, UpperBound)] -&gt; [(a, UpperBound)]
</span><a href="#local-6989586621679631881"><span class="hs-identifier hs-var hs-var">relaxLastInterval'</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-357"></span><span>    </span><span class="annot"><a href="#local-6989586621679631881"><span class="hs-identifier hs-var">relaxLastInterval'</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span id="local-6989586621679631880"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679631880"><span class="hs-identifier hs-var">l</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">UpperBound
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679631880"><span class="hs-identifier hs-var">l</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">UpperBound
</span><a href="Distribution.Types.VersionInterval.html#NoUpperBound"><span class="hs-identifier hs-var">NoUpperBound</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-358"></span><span>    </span><span class="annot"><a href="#local-6989586621679631881"><span class="hs-identifier hs-var">relaxLastInterval'</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679631879"><span class="annot"><span class="annottext">(a, UpperBound)
</span><a href="#local-6989586621679631879"><span class="hs-identifier hs-var">i</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679631878"><span class="annot"><span class="annottext">[(a, UpperBound)]
</span><a href="#local-6989586621679631878"><span class="hs-identifier hs-var">is</span></a></span></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(a, UpperBound)
</span><a href="#local-6989586621679631879"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">(a, UpperBound) -&gt; [(a, UpperBound)] -&gt; [(a, UpperBound)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(a, UpperBound)] -&gt; [(a, UpperBound)]
</span><a href="#local-6989586621679631881"><span class="hs-identifier hs-var">relaxLastInterval'</span></a></span><span> </span><span class="annot"><span class="annottext">[(a, UpperBound)]
</span><a href="#local-6989586621679631878"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-359"></span><span>
</span><span id="line-360"></span><span class="annot"><a href="Distribution.Types.VersionInterval.html#relaxHeadInterval"><span class="hs-identifier hs-type">relaxHeadInterval</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span>
</span><span id="line-361"></span><span id="relaxHeadInterval"><span class="annot"><span class="annottext">relaxHeadInterval :: VersionIntervals -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#relaxHeadInterval"><span class="hs-identifier hs-var hs-var">relaxHeadInterval</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-type">VersionIntervals</span></a></span><span> </span><span id="local-6989586621679631877"><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631877"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[VersionInterval] -&gt; VersionIntervals
</span><a href="Distribution.Types.VersionInterval.html#VersionIntervals"><span class="hs-identifier hs-var">VersionIntervals</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[VersionInterval] -&gt; [VersionInterval]
forall {b}. [(LowerBound, b)] -&gt; [(LowerBound, b)]
</span><a href="#local-6989586621679631876"><span class="hs-identifier hs-var">relaxHeadInterval'</span></a></span><span> </span><span class="annot"><span class="annottext">[VersionInterval]
</span><a href="#local-6989586621679631877"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-362"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-363"></span><span>    </span><span id="local-6989586621679631876"><span class="annot"><span class="annottext">relaxHeadInterval' :: [(LowerBound, b)] -&gt; [(LowerBound, b)]
</span><a href="#local-6989586621679631876"><span class="hs-identifier hs-var hs-var">relaxHeadInterval'</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>         </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-364"></span><span>    </span><span class="annot"><a href="#local-6989586621679631876"><span class="hs-identifier hs-var">relaxHeadInterval'</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621679631875"><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679631875"><span class="hs-identifier hs-var">u</span></a></span></span><span class="hs-special">)</span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679631874"><span class="annot"><span class="annottext">[(LowerBound, b)]
</span><a href="#local-6989586621679631874"><span class="hs-identifier hs-var">is</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LowerBound
</span><a href="Distribution.Types.VersionInterval.html#minLowerBound"><span class="hs-identifier hs-var">minLowerBound</span></a></span><span class="hs-special">,</span><span class="annot"><span class="annottext">b
</span><a href="#local-6989586621679631875"><span class="hs-identifier hs-var">u</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LowerBound, b) -&gt; [(LowerBound, b)] -&gt; [(LowerBound, b)]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[(LowerBound, b)]
</span><a href="#local-6989586621679631874"><span class="hs-identifier hs-var">is</span></a></span><span>
</span><span id="line-365"></span></pre></body></html>